<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改项目六定')" />
    <th:block th:include="include :: jsonview-css" />
    <th:block th:include="includeProject :: project-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content">
        <div class="col-sm-12">
            <div class="row">
                <div class="col-sm-12">
                    <th:block th:include="includeProject :: projectInfo" />
                </div>
            </div>
            <!--<div class="row">
                <div class="col-sm-12">
                    <th:block th:include="includeProject :: projectConstructorInfo" />
                </div>
            </div>-->
            <!-- 六定编辑 -->
            <div class="row">
                <div class="col-sm-12">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5 style="font: bold">定网络</h5>
                            <div class="ibox-tools">
                                <a class="collapse-link">
                                    <i class="fa fa-chevron-up"></i>
                                </a>
                            </div>
                        </div>
                        <div class="ibox-content">
                            <div class="row">
                                <div class="col-sm-12">
                                    <div class="col-md-6">
                                        <div class="info-label">建设内容及规模</div>
                                        <div class="info-value" th:text="${project.projectIntroduct}"></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-12">
                    <th:block th:include="includeProject :: projectInvestInfo('定资金')" />
                </div>
            </div>
            <form class="form form-horizontal m-t"  id="form-sixDone-add">
                <input type="hidden" id="projectId" name="projectId" th:value="${project.projectId}">
            <!-- 定措施 -->
            <div class="row">
                <div class="col-sm-12">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5 style="font: bold">定措施</h5>
                            <div class="ibox-tools">
                                <a class="collapse-link">
                                    <i class="fa fa-chevron-up"></i>
                                </a>
                            </div>
                        </div>
                        <div class="ibox-content">
                            <div class="row">
                                <div class="col-sm-12">
                                    <div class="col-sm-9">
                                        <label class="col-sm-12 control-label is-required" style="font-weight: bold;text-align: left;padding-left: 0px;">推进措施：</label>
                                        <textarea rows="3" cols="2000"  class="form-control" name="projectMeasure" th:field="${project.projectMeasure}" placeholder="请输入" required></textarea>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- 定专班 -->
            <div class="row">
                <div class="col-sm-12">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5 style="font: bold">定专班</h5>
                            <div class="ibox-tools">
                                <a class="collapse-link">
                                    <i class="fa fa-chevron-up"></i>
                                </a>
                            </div>
                        </div>
                        <div class="ibox-content">
                            <div class="row">
                                <div class="col-sm-12">
                                    <div class="col-sm-9">
                                        <label class="col-sm-12 control-label is-required" style="font-weight: bold;text-align: left;padding-left: 0px;">项目推进专班组建情况：</label>
                                        <textarea rows="3" cols="2000"  class="form-control" name="projectDirector" th:field="${project.projectDirector}" placeholder="请输入" required></textarea>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- 定责任 -->
            <div class="row">
                <div class="col-sm-12">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5 style="font: bold">定责任</h5>
                            <div class="ibox-tools">
                                <a class="collapse-link">
                                    <i class="fa fa-chevron-up"></i>
                                </a>
                            </div>
                        </div>
                        <div class="ibox-content">
                            <div class="row">
                                <div class="col-sm-12">
                                    <div class="col-sm-6">
                                        <label class="col-sm-12 control-label is-required" style="font-weight: bold;text-align: left;padding-left: 0px;">项目责任人：</label>
                                        <div>
                                            <input name="responseName" th:value="${project.responseName}" placeholder="请输入项目责任人" class="form-control" type="text" required>
                                        </div>
                                    </div>
                                    <div class="col-sm-3">
                                        <label class="col-sm-12 control-label is-required" style="font-weight: bold;text-align: left;padding-left: 0px;">手机号码：</label>
                                        <div>
                                            <input name="responsePhone" th:value="${project.responsePhone}" class="form-control" placeholder="请输入手机号码" type="text" maxlength="11"  required>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- 定考核 -->
            <div class="row">
                <div class="col-sm-12">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5 style="font: bold">定考核</h5>
                            <div class="ibox-tools">
                                <a class="collapse-link">
                                    <i class="fa fa-chevron-up"></i>
                                </a>
                            </div>
                        </div>
                        <div class="ibox-content">
                            <div class="row">
                                <div class="col-sm-12">
                                    <div class="col-sm-3">
                                        <label class="col-sm-12 control-label is-required" style="font-weight: bold;text-align: left;padding-left: 0px;">2022年第一季度拟完成投资：</label>
                                        <div class="input-group m-b col-md-12"><span class="input-group-addon">&yen;</span>
                                            <input name="planInvestQuarter1" th:value="${#numbers.formatDecimal(project.planInvestQuarter1,1,2)}" placeholder="请输入" class="form-control" type="text" required>
                                            <span class="input-group-addon">亿元</span>
                                        </div>
                                    </div>
                                    <div class="col-sm-3">
                                        <label class="col-sm-12 control-label is-required" style="font-weight: bold;text-align: left;padding-left: 0px;">2022年第二季度拟完成投资：</label>
                                        <div class="input-group m-b col-md-12"><span class="input-group-addon">&yen;</span>
                                            <input name="planInvestQuarter2" th:value="${#numbers.formatDecimal(project.planInvestQuarter2,1,2)}" placeholder="请输入" class="form-control" type="text" required>
                                            <span class="input-group-addon">亿元</span>
                                        </div>
                                    </div>
                                    <div class="col-sm-3">
                                        <label class="col-sm-12 control-label is-required" style="font-weight: bold;text-align: left;padding-left: 0px;">2022年第三季度拟完成投资：</label>
                                        <div class="input-group m-b col-md-12"><span class="input-group-addon">&yen;</span>
                                            <input name="planInvestQuarter3" th:value="${#numbers.formatDecimal(project.planInvestQuarter3,1,2)}" placeholder="请输入" class="form-control" type="text" required>
                                            <span class="input-group-addon">亿元</span>
                                        </div>
                                    </div>
                                    <div class="col-sm-3">
                                        <label class="col-sm-12 control-label is-required" style="font-weight: bold;text-align: left;padding-left: 0px;">2022年第四季度拟完成投资：</label>
                                        <div class="input-group m-b col-md-12"><span class="input-group-addon">&yen;</span>
                                            <input name="planInvestQuarter4" th:value="${#numbers.formatDecimal(project.planInvestQuarter4,1,2)}" placeholder="请输入" class="form-control" type="text" required>
                                            <span class="input-group-addon">亿元</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            </form>
            <div class="row">
                <div class="col-sm-12">
                    <th:block th:include="includeProject :: approveLogs" />
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-sm-offset-5 col-sm-10">
            <button type="button" class="btn btn-sm" onclick="closeItem()"><i class="fa fa-reply-all"></i>返 回</button>
            <button type="button" class="btn btn-sm btn-primary" onclick="saveProjectInvest()"><i class="fa fa-remove"></i>保存</button>
            <button type="button" class="btn btn-sm btn-info" onclick="submitProjectInvest()" id="submitBtn" disabled><i class="fa fa-plus"></i>上报</button>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="includeProject :: project-js" />
    <script th:inline="javascript">
        var prefix = ctx + "manage/sixDone"
        $("#form-sixDone-add").validate({
            focusCleanup: true,
            rules: {
                planInvestQuarter1: {number: true, gt: 0},
                planInvestQuarter2: {number: true, gt: 0},
                planInvestQuarter3: {number: true, gt: 0},
                planInvestQuarter4: {number: true, gt: 0},
                responsePhone: {isPhone: true}
            }
        });

        function saveProjectInvest() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-sixDone-add').serialize());
                $("#submitBtn").removeAttr("disabled");
            }
        }

        function submitProjectInvest() {
            $.modal.confirm("确定上报该项目六定吗？", function() {
                var projectId = $('#projectId').val();
                $.operate.saveTab(prefix + "/submit", {'projectId':projectId});
            });
        }

        // 合起项目基础信息
        $('#_projectInfo_link').trigger('click');
    </script>
</body>
</html>